﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.exam.ScoreInput3" %>
<%@ Import Namespace="E.Enum" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>学员成绩输入</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/exam.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/exam.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript">
    window.onload = function() {
    document.getElementById("loading").style.display = "none";
    document.getElementById("form1").style.display = "";
    }
  </script>
</head>
<body>
  <div id="loading">数据加载中，请稍等</div>
  <form id="form1" method="post" action="?act=s" style="display:none;">
    <div class="m_top"></div>
    <div class="block" style="height:100px;">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;学员成绩输入</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">认证类别：</div>
        <div class="fl">
          <% if (certificateList != null && certificateList.Count > 0) { %>
          <select id="CertificateSlt" name="CertificateSlt">
            <option value="-1">请选择认证类别</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in certificateList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;培训机构：</div>
        <div class="fl">
          <select id="AreaSlt" name="AreaSlt">
            <option value="-1">全部</option>
            <% if (areaList != null && areaList.Count > 0) { %>
              <% foreach (DictAreaModel model in areaList) { %>
            <option value="<%=model.ID %>"><%=model.Name%></option>
              <% } %>
            <% } %>
          </select>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;成绩类型：</div>
        <div class="fl">
          <select id="ScoreSlt" name="ScoreSlt">
            <option value="-1">全部</option>
           <% if (scoreCategoryList != null && scoreCategoryList.Count > 0) { %>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in scoreCategoryList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          <% } %>
          </select>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;记录显示数：</div>
        <div class="fl">
          <select id="DisplayQuantitySlt" name="DisplayQuantitySlt">
            <option value="-1">全部</option>
            <option value="10">10</option>
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
          </select>
        </div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">登录名：</div>
        <div class="fl"><input type="text" id="LoginIDTxt" name="LoginIDTxt" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;姓名：</div>
        <div class="fl"><input type="text" id="UserNameTxt" name="UserNameTxt" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;是否已有分数：</div>
        <div class="fl">
          <select id="IsInputedSlt" name="IsInputedSlt">
            <option value="-1">全部</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
        </div>
        <div class="fl">&nbsp;&nbsp;<input type="image" style="width:54px; height:23px;" src="/images/btn/search.gif" onclick="return ConfirmSearch();" /></div>
      </div>
    </div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (scoreList != null && scoreList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_li">登录名</div>
          <div class="d_r_un">姓名</div>
          <div class="d_r_sc">成绩类型</div>
          <div class="d_r_is">分数</div>
          <div class="d_r_oo">操作</div>
        </div>
        
        <% int i = 0; %>
        <% foreach (ShortScoreInputModel model in scoreList) { %>
        <div class="data_rows">
          <div class="d_r_li"><%=model.LoginID %></div>
          <div class="d_r_un"><%=model.UserName %></div>
          <div class="d_r_sc">
             <% if (scoreCategoryList != null && scoreCategoryList.Count > 0) { %>
            <select id="ScoreSlt_<%=i %>" name="ScoreSlt_<%=i %>">
              <option value="-1">未录入</option>
              <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in scoreCategoryList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
              <% } %>
            </select>
            <% } %>
          </div>
          <div class="d_r_is"><input type="text" id="ScoreInput_<%=i %>" value="<%=model.Score %>" style="width:50px;" maxlength="4" /></div>
          <div class="d_r_oo"><a href="/exam/ScoreEdit.aspx?id=<%=model.UserID %>">编辑</a></div>
          <input type="hidden" id="UserID_<%=i %>" value="<%=model.UserID %>" />
        </div>
        <script type="text/javascript">$("#ScoreSlt_<%=i %>").val("<%=(int)model.ScoreCategoryID %>");</script>
        <% i++; %>
        <% } %>
        <input type="hidden" id="count" name="count" value="<%=scoreList.Count %>" />
        <input type="hidden" id="uid_v" name="uid_v" />
        <input type="hidden" id="scid_v" name="scid_v" />
        <input type="hidden" id="s_v" name="s_v" />
      </div>
      <div class="fr" style="margin-top:10px;"><img alt=""src="/images/btn/confirm2.gif" class="cursor" onclick="InputHandle();" /></div>
    <% } else { %>
    <% } %>
    
    </div>
    
    <% if (act == "s") { %>
    <script type="text/javascript">
      $("#CertificateSlt").val("<%=certificateid %>");
      $("#AreaSlt").val("<%=areaid %>");
      $("#ScoreSlt").val("<%=scoreCategoryid %>");
      $("#LoginIDTxt").val("<%=loginid %>");
      $("#UserNameTxt").val("<%=userName %>");
      $("#IsInputedSlt").val("<%=isInputed %>");
      $("#DisplayQuantitySlt").val("<%=recordDisplayQuantity %>");
    </script>
    <% } %>
  </form>
</body>
</html>
